package com.wn.mapper;

import com.wn.pojo.Move;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface MoveMapper {
    //预约
    @Insert("insert into move_booking(area,cartype,movedate,contact,phone,status) values(#{area},#{cartype},#{movedate},#{contact},#{phone},#{status})")
    int add(Move move);

    //查询总的条数
    @Select("select count(*) from move_booking")
    int getCount();

    //分页查询
    @Select("select * from move_booking")
    List<Move> getProductByPage();

    @Update("update move_booking set status=#{status} where id=#{id}")
    int update(Move move);

    @Select("select * from move_booking where id=#{id}")
    Move selectById(Integer id);
}
